- if is_officer?
  = error_messages_for("zone")
  - form_tag(:controller => "zones", :action => "create") do
    %table
      %tr
        %td Name
        %td= text_field("zone", "name", { :size => 40 })
      %tr
        %td
        %td= submit_tag("Create new zone")
  %br

- @zones.each do |zone|
  %table
    %tr
      %td= zone.name
    - zone.mobs.each do |mob|
      %tr
        %td
        = render(:partial => mob, :locals => { :mob => mob })

- if is_officer?
  %br
  = error_messages_for("mob")
  - form_tag(:controller => "mobs", :action => "create") do
    %table
      %tr
        %td Zone
        %td= collection_select("mob", "zone_id", @zones, "id", "name", :include_blank => true)
      %tr
        %td Name
        %td= text_field("mob", "name", { :size => 40 })
      %tr
        %td
        %td= submit_tag("Add mob")
